﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt
{
	// Token: 0x020000A7 RID: 167
	public class TDropSynonymStmt : TCustomSqlStatement
	{
		// Token: 0x170000CF RID: 207
		// (get) Token: 0x06000530 RID: 1328 RVA: 0x002FCB3D File Offset: 0x002FAD3D
		// (set) Token: 0x06000531 RID: 1329 RVA: 0x002FCB45 File Offset: 0x002FAD45
		public virtual TObjectName SynonymName
		{
			get
			{
				return this.synonymName;
			}
			set
			{
				this.synonymName = value;
			}
		}

		// Token: 0x06000532 RID: 1330 RVA: 0x002FCB4E File Offset: 0x002FAD4E
		public TDropSynonymStmt(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstdropsynonym;
		}

		// Token: 0x06000533 RID: 1331 RVA: 0x002FCB60 File Offset: 0x002FAD60
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			this.synonymName = (TObjectName)((TDummy)this.rootNode).node1;
			this.synonymName.DbObjectType = EDbObjectType.synonym;
			base.DatabaseObjects.Add(this.synonymName);
			return 0;
		}

		// Token: 0x06000534 RID: 1332 RVA: 0x002FCBB9 File Offset: 0x002FADB9
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000535 RID: 1333 RVA: 0x002FCBC9 File Offset: 0x002FADC9
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x04001138 RID: 4408
		private TObjectName synonymName;
	}
}
